<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<body>
    <h2>登录</h2>
    <hr>
    {% if error %}
        <p style="color: red;">{{ error }}</p>
    {% endif %}
    <form action="{% url 'user:login' %}" method="post">
        {% csrf_token %}
        <p>用户名：<input type="text" name="uname"></p>
        <p>密码：<input type="password" name="passwd"></p>
        <p><button type="submit">登录</button></p>
    </form>
</body>
</html>